package commons.test;

import java.net.Socket;

public class DummySocket extends Socket {

	private boolean	closed;
	private boolean	connected;
	private boolean	inputShutdown;
	private boolean	outputShutdown;

	public DummySocket() {

	}

	@Override
	public void close() {
		closed = true;
	}

	@Override
	public boolean isClosed() {
		return closed;
	}

	@Override
	public boolean isConnected() {
		return connected;
	}

	@Override
	public boolean isInputShutdown() {
		return inputShutdown;
	}

	@Override
	public boolean isOutputShutdown() {
		return outputShutdown;
	}

	public void setClosed(final boolean closed) {
		this.closed = closed;
	}

	public void setConnected(final boolean connected) {
		this.connected = connected;
	}

	public void setInputShutdown(final boolean inputShutdown) {
		this.inputShutdown = inputShutdown;
	}

	public void setOutputShutdown(final boolean outputShutdown) {
		this.outputShutdown = outputShutdown;
	}
}